<?php
/**
 * Created by PhpStorm.
 * User: kuafu
 * Date: 2017/2/26
 * Time: 22:24
 */

namespace app\helpers;

class Utility
{
    public static function formatDate($date, $format="Y-m-d H:i:s")
    {
        if(!is_numeric($date))
        {
            $date = strtotime($date);
        }
        return date($format, $date);
    }
}